<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:composite="http://java.sun.com/jsf/composite"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">

<composite:interface>
	<composite:attribute name="title" />
</composite:interface>

<composite:implementation>
	<p:panel id="UserPanel">
		<h:form id="asForm">

			<p:tab id="profileData" title="#{userBean.profileData.lastName}">

				<p:panelGrid columns="2" cellpadding="10">
					<h:outputText value="Benutzername: " />
					<h:outputText id="userName"
						value="#{userBean.profileData.username}" style="font-weight: bold" />

					<h:outputText value="Vorname: " />
					<h:outputText id="firstName"
						value="#{userBean.profileData.firstName}"
						style="font-weight: bold" />

					<h:outputText value="Nachname: " />
					<h:outputText id="surName" value="#{userBean.profileData.lastName}"
						style="font-weight: bold" />

					<h:outputText value="Ort:" />
					<h:outputText id="city" value="#{userBean.profileData.city}"
						style="font-weight: bold" />

					<h:outputText value="Abteilung:" />
					<h:outputText id="department"
						value="#{userBean.profileData.department.name}"
						style="font-weight: bold" />

					<h:outputText value="Mail:" />
					<h:outputText id="email" value="#{userBean.profileData.email}"
						style="font-weight: bold" />

					<h:outputText value="Raum:" />
					<h:outputText id="roomNumber"
						value="#{userBean.profileData.roomNumber}"
						style="font-weight: bold" />

					<h:outputText value="Telefon:" />
					<p:inputText id="telephone"
						value="#{userBean.profileData.telephone}"
						style="font-weight: bold" />

					<h:outputText value="Interessen:" />
					<p:inputText id="interests"
						value="#{userBean.profileData.interests}"
						style="font-weight: bold" />

					<h:outputText value="Expertisen:" />
					<p:inputText id="expertise"
						value="#{userBean.profileData.expertise}"
						style="font-weight: bold" />

				</p:panelGrid>
				<p:commandButton actionListener="#{userController.updateUser}"
					value="Speichern" icon="ui-icon-disk" ajax="false" />

			</p:tab>

		</h:form>
		<h:form enctype="multipart/form-data" id="multipartForm" >

			<p:commandButton
				actionListener="#{fileUploadController.uploadUserProfileImage}"
				value="Profilbild hochladen" />

			<p:messages showDetail="true" />

			<p:fileUpload value="#{userBean.uploadedFile}" mode="simple" />

		</h:form>
	</p:panel>
</composite:implementation>
</html>